package com.example.emos.wx.message.model.pojo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

/**
 * 消息实体
 * @Author YinXi
 * @Versin 1.0.0
 * @Date 2023/9/12
 */
@Data
@Document(collection = "message")
public class MessageEntity implements Serializable {
    @Id
    private String _id;

    @Indexed(unique = true)
    private String uuid;

    private Integer senderId;

    private String senderPhoto = "https://tupian.qqw21.com/article/UploadPic/2020-5/202051816204058601.jpg";

    private String senderName;

    private String msg;

    @Indexed
    private Date sendTime;
}
